﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Emlyn.AudioToVideo.JobProcessorLib.Interfaces
{
    public interface IJob
    {
        string JobID { get; }
        string JobDetails { get; set; } // set this before calling start, it's the job's configuration.
        JobState State { get; }
        DateTime LastStateChange { get; }
        int ProgressAmount { get; } // 0 to 100, or -1 for unknown
        string ErrorMessage { get; } //an error message in case of failure
        int ResultCode { get; } // a result code, 0 for success, >0 for the error (not sure about bothering with this)
        void Start(); // moves the job from Created to Started, and possibly to InProgress
        void Cancel(); // moves the job from Started or InProgress to Failed (cancelled)
    }
}
